package t1001;

import java.util.Scanner;

public class Main {

    static int count = 0;

    static void judge(int n) {


        if (n == 1) {
            return;
        }

        count++;

        if (n % 2 == 0) {

            judge(n / 2);
        } else {

            judge((3 * n + 1 )/ 2);
        }
    }

    public static void main(String[] args) {
        int num;
        Scanner scanner = new Scanner(System.in);

        num = scanner.nextInt();


        judge(num);

        System.out.println(count);


    }
}
